
import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class Test02 {
    public static void main(String[] args)throws ClassNotFoundException{
        Class  aClass = Class.forName("User");

        Method[] declaredMethods=aClass.getDeclaredMethods();
        for (Method declaredMethod : declaredMethods){
            System.out.println(declaredMethod);
        }

        System.out.println("========================================");
        Field[]declaredClasses = aClass.getDeclaredFields();
        for (Field declaredClass : declaredClasses){
            System.out.println(declaredClass);
        }
    }
}
